﻿
Partial Class Default2
    Inherits System.Web.UI.Page

    Dim ocnTrabajo As New Negocio.Trabajo

    Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
        Try
            ocnTrabajo.RegistrarAN(Me.TBexpediente.Text, Me.TBresolucion.Text, CDate(Me.TBfecha.Text))
            Me.GridView2.DataSource = ocnTrabajo.obtenerNotaExpediente(Me.TBexpediente.Text)
            Me.GridView2.DataBind()
        Catch ex As Exception
            Session.Add("Error", ex)
            Response.Redirect("ManejarErrores.aspx")
        End Try
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click
        Me.GridView1.DataSource = ocnTrabajo.obtenerTrabajoExpediente(Me.TBexpediente.Text)
        Me.GridView1.DataBind()
    End Sub
End Class
